setShareIntent

open fun setShareIntent(shareIntent: Intent)(source)

Sets an intent with information about the share action. Here is a sample for constructing a share intent:

 Intent shareIntent = new Intent(Intent.ACTION_SEND);
 shareIntent.setType("image/*");
 Uri uri = Uri.fromFile(new File(getFilesDir(), "foo.jpg"));
 shareIntent.putExtra(Intent.EXTRA_STREAM, uri.toString());

Parameters

shareIntent

The share intent.

See also